package 访问者设计模式;

public class Pharmacist extends Vistitor {
    @Override
    public void visit(Amoxicillin amoxicillin) {
        System.out.println("药剂师:" + name + "正在配" + amoxicillin.getName() + "的药");
    }

    @Override
    public void visit(Painkiller painkiller) {
        System.out.println("药剂师:" + name + "正在配" + painkiller.getName() + "的药");
    }
}
